<template>
  <div class="alarm-container">
    <!-- <div class="alarm-title">报警信息</div> -->
    <div class="alarm-container-top">
      <div class="alarm-item">
        <span class="alarm-des">报警数量统计：</span>
        <span class="color-red" style="font-size: 18px;">{{ waringData.waringTongji }}起</span>
      </div>
      <div class="alarm-item">
        <span class="alarm-des">危化品车辆未停在指定区域：</span>
        <span class="color-red">{{ waringData.waringWeihuaweiting }}起</span>
      </div>
      <div class="alarm-item">
        <span class="alarm-des">非危化品车辆占用危化品车位：</span>
        <span class="color-red">{{ waringData.waringFeiweihuazhanyong }}起</span>
      </div>
      <div class="alarm-item">
        <span class="alarm-des">未按线停放：</span>
        <span class="color-red">{{ waringData.waringWeitinghao }}起</span>
      </div>
      <div class="alarm-item">
        <span class="alarm-des">停放超时预警：</span>
        <span class="color-red">{{ waringData.waringTingchaoshi }}起</span>
      </div>
      <div class="alarm-item">
        <span class="alarm-des">人员停留时间过久：</span>
        <span class="color-red">{{ waringData.waringRenyuanchaoshi }}起</span>
      </div>
    </div>
    <div class="alarm-container-bottom">
        <div class="color-white" v-for="(item,index) in waringData.listKey " :key="index">
          <span >{{ item.shijian }}</span>
          <span class="itme">{{ item.paizi }}</span>
          <img  src="../assets/img/biaoji.svg" @click="isShow=!isShow" />
        </div>
    </div>
    <div v-if="isShow" class="dialog-view">
        <div class="dialog-view-content">
          <!-- 标题 -->
          <div class="dialog-view-title">
            <div class="title">报警信息</div>
            <div class="element" @click="isShow=!isShow">X</div>
          </div>
          <!-- 内容 -->
          <div class="dialog-view-content-box">
            <!-- 左侧内容 -->
            <div class="dialog-view-content-box-left">
              <div class="dialog-view-content-box-left-img">
                <p class="title">报警图片</p>
                <img src="../assets/img/image.png" />
              </div>
              <div class="dialog-view-content-box-left-text">
                <p class="title">报警信息</p>
                <p class="main-text">危化品车辆未停在指定区域</p>
              </div>
              <div class="dialog-view-content-box-left-text">
                <p class="title">违规车辆信息</p>
                <p style="margin-bottom: 10px;">&nbsp;&nbsp;&nbsp;&nbsp;车牌号：辽A23F65</p>
                <p>入场时间：2024-03-27 10:22:43</p>
              </div>
            </div>
            <!-- 右侧内容 -->
            <div class="dialog-view-content-box-right">
              <div class="dialog-view-content-box-right-text">
                <p class="title">处理结果</p>
                <textarea style="width:343.8px; height: 249px; padding: 5px; border: none"></textarea>
              </div>
              <div class="dialog-view-content-box-right-btn">
                <div @click="isShow=!isShow">提交处理</div>
                <div @click="isShow=!isShow">取 消</div>
              </div>
            </div>
          </div>
        </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      isShow:false,
        waringData:{
		waringTongji:'4',
		waringWeihuaweiting:'2',
	waringFeiweihuazhanyong:'1',
		waringWeitinghao:'1',
		waringTingchaoshi:'0',
		waringRenyuanchaoshi:'0',
		listKey:[
			{
				'lei':'1',
				'shijian':'2024-03-27 10:22:43',
				'paizi':'辽A23F65',
				'baojing':'1',
				'xiaoxi':' ',
			},
			{
				'lei':'2',
				'shijian':'2024-03-27 10:23:24',
				'paizi':'浙C75D11',
				'baojing':'1',
				'xiaoxi':' ',
			},
			{
				'lei':'3',
				'shijian':'2024-03-27 10:25:04',
				'paizi':'鲁C33W27',
				'baojing':'1',
				'xiaoxi':' ',
			},
			{
				'lei':'4',
				'shijian':'2024-03-27 10:32:12',
				'paizi':'黑A2H345',
				'baojing':'1',
				'xiaoxi':' ',
			},
			{
				'lei':'4',
				'shijian':'2024-03-27 10:34:52',
				'paizi':'吉D24245',
				'baojing':'2',
				'xiaoxi':'危化品车辆未停在指定位置',
			},
			{
				'lei':'2',
				'shijian':'2024-03-27 10:37:22',
				'paizi':'辽B2S545',
				'baojing':'1',
				'xiaoxi':' ',
			},
      {
				'lei':'2',
				'shijian':'2024-03-27 10:37:22',
				'paizi':'辽B2S545',
				'baojing':'1',
				'xiaoxi':' ',
			},
      {
				'lei':'4',
				'shijian':'2024-03-27 10:34:52',
				'paizi':'吉D24245',
				'baojing':'2',
				'xiaoxi':'危化品车辆未停在指定位置',
			},
			{
				'lei':'2',
				'shijian':'2024-03-27 10:37:22',
				'paizi':'辽B2S545',
				'baojing':'1',
				'xiaoxi':' ',
			}
]
}
    };
  },
  components: {},
  created() {},
  mounted() {},
  methods: {},
};
</script>

<style scoped>
.alarm-container {
  display: flex;
  flex-direction: column;
  width: calc(100% - 40px);
  height: 100%;
  overflow: auto;
}
@keyframes borderAnimation {
  0% {
    width: 0%;
  }
  100% {
    width: 100%;
  }
}

.alarm-title {
  position: relative;
  font-size: 20px;
  font-weight: 700;
  height: 30px;
  width: 100%;
}

.alarm-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px; /* Set the thickness of the line */
  background-color:  #09DEFF; /* Set the color of the line */
  animation: borderAnimation 6s linear infinite; /* Apply the animation */
}

.color-red {
  color: rgb(255, 153, 0);
  font-weight: 700;
  font-size: 16px;
  width: 180px;
  margin-left: 20px;
  text-align: left;
}

.alarm-des {
  text-align: right;
  flex:1;
}

.alarm-item {
  width: 100%;
  text-align: right;
  display:flex;
}

.alarm-container-top {
  text-align: right;
  padding-top:10px;
  padding-bottom:10px;
}
.alarm-container-bottom{
  height: calc(100% - 170px);
  overflow: auto;
}

.color-white{
    color: #fff;
    display: flex;
    text-align: center;
    width: 100%;
    margin-bottom:5px;
}
.itme{
  flex:1;
}




/* Customize scrollbar for WebKit-based browsers */
.alarm-container-bottom::-webkit-scrollbar {
  width: 10px; /* Set the width of the scrollbar */
}

/* Track */
.alarm-container-bottom::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1); /* Set the background color of the track */
}

/* Handle */
.alarm-container-bottom::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.5); /* Set the color of the scrollbar handle */
  border-radius: 5px; /* Add rounded corners to the scrollbar handle */
}
.dialog-view {
  position: fixed;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999999999;
  top:0;
  left:0;
}

.dialog-view-content{
  height: 602px;
  width: 861px;
   position: relative;
   top: 50%;
   left: 50%;
   width:50%;
   transform: translate(-50%, -50%);
   background-image: url('../assets/img/bg2.svg');
/* 背景图片铺满整个元素 */
  background-size: cover;

  /* 确保背景图片不重复 */
  background-repeat: no-repeat;

  /* 确保背景图片随元素一起缩放 */
  background-attachment: fixed;

  /* 确保背景图片在元素内居中 */
  background-position: center;
}

.dialog-view-title{
  padding: 30px 46px;
    display: flex;
    height: 40px;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 0px;
}
.dialog-view-title .title{
  font-size: 20px;
  font-weight: 700;
  color: #fff;
}
.element{
  font-size: 20px;
  font-weight: 700;
  color: #fff;
}
.element:hover {
  cursor: pointer;
}
.dialog-view-title div{
    font-size: 18px;
    font-weight: 700;
    color: #fff;
}
.dialog-view-content-box{
  display:flex;
  padding:10px 60px;
}
.dialog-view-content-box-left .dialog-view-content-box-left-img{
  margin-bottom: 20px;
}
.dialog-view-content-box-left .dialog-view-content-box-left-img p{
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 10px;
}
.dialog-view-content-box-left .dialog-view-content-box-left-img img{
    width:343.8px;
    height: 249px;
}
.dialog-view-content-box-left-text{
  margin-bottom: 20px;
}
.dialog-view-content-box-left .dialog-view-content-box-left-text .title{
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 10px;
}
.main-text{
  font-size: 16px;
    font-weight: 700;
    color: red;
}
.dialog-view-content-box-right{
  margin-left: 50px;
}
.dialog-view-content-box-right-text .title{
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 10px;
}
.dialog-view-content-box-right-btn{
  height: 210px;
  text-align: right;
  text-align: center;
    display: flex;
    justify-content: end;
    align-items: self-end;
}
.dialog-view-content-box-right-btn div{
    width: 166px;
    height: 52px;
    line-height: 52px;
    text-align: center;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    margin-left: 10px;

    background-color: #09DEFF;
    border-radius: 5px;
   background-image: url('../assets/img/btn.png');
/* 背景图片铺满整个元素 */
  background-size: cover;

  /* 确保背景图片不重复 */
  background-repeat: no-repeat;

  /* 确保背景图片随元素一起缩放 */
  background-attachment: fixed;

  /* 确保背景图片在元素内居中 */
  background-position: center;
}
</style>
